package com.example.design.decorator;

/**
 * @author: Bin.L
 * @date: 2022/3/14  16:41
 * @Description: 装饰器模式执行方法 [https://www.jianshu.com/p/d80b6b4b76fc]
 */
public class ExecuteMain {

    public static void main(String[] args) {
        Component sage = new Monkey();

        // 半透明的装饰模式
        Bird bird = new Bird(sage);
        bird.move();
        bird.fly();


        System.out.println("--------------------------");

        Component fish = new Fish(new Bird(sage));
        fish.move();
    }
}
